package vuelos;

public class LoginScreenTraer implements Runnable {
	
	private LoginScreen Window;	
	
	public LoginScreenTraer(LoginScreen SC){
	   super();
	   Window = SC;
	}	
	
	public void run() {
	   int posY = Window.getY();
	   int posX = Window.getX();
	   while (posY > 60) {
		 try {  
		   Thread.sleep(0);
		 }
		 catch (Exception ex) {
			System.out.println(ex.getMessage()); 
		 } 
		 posY = posY - 8;
		 Window.setLocation(posX, posY);
		 Window.repaint();
	   }
	   try {  
	    Thread.sleep(30);
	   }
	   catch (Exception ex) {
		 System.out.println(ex.getMessage()); 
	   }
	   while (posY < 100) {
			 try {  
			   Thread.sleep(0);
			 }
			 catch (Exception ex) {
				System.out.println(ex.getMessage()); 
			 } 
			 posY = posY + 4;
			 Window.setLocation(posX, posY);
			 Window.repaint();
	   }
	}

}
